package com.yonyou.cloud.member.config.json;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.yonyou.cloud.member.domainmodel.vo.EntityId;

import java.io.IOException;

public class EntityIdSerializer extends JsonSerializer<EntityId> {
    @Override
    public void serialize(EntityId value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
        // gen.writeString(value.toString());
        gen.writeNumber(value.getId());
    }
}
